//
//  AppClient.h
//  Water
//
//  Created by yh on 2017/11/27.
//  Copyright © 2017年 chenguibang. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "PlanItem.h"
#import "AppNotificationManager.h"
#import "LoginRequest.h"
#import "UserInfo.h"
#import "ServerModel.h"
#import "BottleItem.h"
#define AppClientNOTI_LOGIN_SUCEESS  @"AppClientNOTI_LOGIN_SUCEESS" //登录成功
#define AppClientNOTI_LOGIN_FAILE  @"AppClientNOTI_LOGIN_FAILE" //登录失败
#define AppClientNOTI_USERINFO_CHANGE  @"AppClientNOTI_USERINFO_CHANGE" //用户信息更新
#import <RongCloudIM/RongIMKit/RCIM.h>


@interface AppClient : NSObject<NSCoding,RCIMUserInfoDataSource,RCIMGroupInfoDataSource,RCIMReceiveMessageDelegate>
@property (nonatomic ,strong) NSArray<AppClient*> *userInfos; //!< 历史登录过的用户
@property (nonatomic, strong) NSMutableArray *plans;
@property (nonatomic, strong) NSArray *defultPlans;
@property (nonatomic, copy) NSString* todayTarget;
@property (nonatomic, strong) NSMutableArray<ServerModel *> *servers;
@property (nonatomic, strong) ServerModel *currentServer;
@property (nonatomic, strong) NSMutableArray<BottleItem *> *customBottles; //自定义水杯大小


+ (instancetype)shared;


- (void)setup;

#pragma mark - 计划操作

- (void)addPlan:(PlanItem *)plan;

- (void)deletePlan:(PlanItem *)plan;

- (void)updatePlan:(PlanItem *)plan;

- (void)savePlans;

- (void)useDefultPlans:(BOOL)defult;

#pragma mark - 水杯设置

- (void)addBottle:(BottleItem *)bottle;

- (void)deleteBottle:(BottleItem *)bottle;

- (void)updateBottle:(BottleItem *)bottle;

- (void)saveBottles;


@end
